package social.hub.api.linkedin.util;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import social.hub.api.linkedin.LinkedInPublication;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "publicationList" })
@XmlRootElement(name = "publications")
public class LinkedInPublicationListResponse {

	@XmlElement(name = "publication", required = true, type = LinkedInPublication.class)
	protected List<LinkedInPublication>	publicationList;

	@XmlAttribute(required = true)
	@XmlJavaTypeAdapter(LinkedInDateAdapter.class)
	protected Long				total;

	public Long getTotal() {
		return total;
	}
	
	public void setTotal(Long value) {
		this.total = value;
	}

	public List<LinkedInPublication> getPublicationList() {
		if (publicationList == null) {
			publicationList = new ArrayList<LinkedInPublication>();
		}
		return this.publicationList;
	}

	public void setPublicationList(List<LinkedInPublication> publicationList) {
		this.publicationList = publicationList;
	}

}
